#include "stdafx.h"
#include "global.h"

CString CGlobal::GetFirstParam(CString& strName)
{
	int nPos = strName.Find(_T(","));

	TCHAR szRes[MAX_PATH];
	_tprintf(szRes,_T("%s"), strName);
	if(nPos >= 0 && nPos <= strName.GetLength())
	{
		szRes[nPos] = '\0';
	}
	strName.Delete(0, nPos + 1);
	strName.TrimLeft();
	strName.TrimRight();

	return szRes;
}